/*
 * @Description: 项目经理月报评价接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2022-04-12 09:56:02
 * @LastEditTime: 2022-04-14 15:28:15
 * @FilePath: \cscec-pms-admin\src\api\project\projectManagerMonthlyReportEvaluate\index.js
 */
import request from '@/utils/request2'
import { faceApiUrl } from '@/api/config'
const api = {
  list: {
    getPageMonthlyReportEvaluationBySearch: faceApiUrl + '/projectManagerMonthlyReportEvaluation/getPageMonthlyReportEvaluationBySearch'
  },
  view: {
    queryProjectManagerMonthlyReportEvaluationDetail: faceApiUrl + '/projectManagerMonthlyReportEvaluation/queryProjectManagerMonthlyReportEvaluationDetail'
  },
  audit: {
    queryMonthlyReportEvaluationApprovalDetail: faceApiUrl + '/projectManagerMonthlyReportEvaluation/queryMonthlyReportEvaluationApprovalDetail',
    evaluationScore: faceApiUrl + '/projectManagerMonthlyReportEvaluationScore/evaluationScore'
  }
}
// 列表接口
const list = {
  /**
   * @description: 获取项目经理月报评价列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getPageMonthlyReportEvaluationBySearch: data => {
    return request({
      url: api.list.getPageMonthlyReportEvaluationBySearch,
      method: 'post',
      data
    })
  }
}
// 详情接口
const view = {
  /**
   * @description: 获取项目经理月报评价详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryProjectManagerMonthlyReportEvaluationDetail: data => {
    return request({
      url: `${api.view.queryProjectManagerMonthlyReportEvaluationDetail}/${data}`,
      method: 'get',
      data
    })
  }
}
// 审批接口
const audit = {
  /**
   * @description: 获取审批详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryMonthlyReportEvaluationApprovalDetail: data => {
    return request({
      url: `${api.audit.queryMonthlyReportEvaluationApprovalDetail}/${data}`,
      method: 'get',
      data
    })
  },
  /**
   * @description: 审批打分
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  evaluationScore: data => {
    return request({
      url: api.audit.evaluationScore,
      method: 'post',
      data
    })
  },
}
export {
  list,
  view,
  audit
}
